package com.dean.entity;
/**
 * @ClassName TableInfo
 * @Description 表信息
 * @Author dean
 * @Date 2021/10/3 10:03
 */
public class TableInfo {

	private final String TABLE_NAME = "TABLE_NAME";

	private final String ENTITY_NAME = "ENTITY_NAME";

	private final String FIRST_UPPER_ENTITY_NAME = "FIRST_UPPER_ENTITY_NAME";

	private final String TABLE_COMMENT = "TABLE_COMMENT";

	/**
	 * 表名
	 */
	private String tableName;

	/**
	 * 首字母大写的 实体类名
	 */
	private String firstUpperEntityName;

	/**
	 * 实体类名
	 */
	private String entityName;

	/**
	 * 表中文名
	 */
	private String tableComment;

	public String getTableName() {
		return tableName;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	public String getFirstUpperEntityName() {
		return firstUpperEntityName;
	}

	public void setFirstUpperEntityName(String firstUpperEntityName) {
		this.firstUpperEntityName = firstUpperEntityName;
	}

	public String getEntityName() {
		return entityName;
	}

	public void setEntityName(String entityName) {
		this.entityName = entityName;
	}

	public String getTableComment() {
		return tableComment;
	}

	public void setTableComment(String tableComment) {
		this.tableComment = tableComment;
	}

	/**
	 * 设置指定的字段信息
	 * @param fieldName
	 * @param fieldValue
	 */
	public void set(String fieldName,String fieldValue){
		fieldName = fieldName.toUpperCase();
		switch (fieldName){
			case TABLE_NAME:
				setTableName(fieldValue);
				break;
			case ENTITY_NAME:
				setEntityName(fieldValue);
				break;
			case TABLE_COMMENT:
				setTableComment(fieldValue);
				break;
			case FIRST_UPPER_ENTITY_NAME:
				setFirstUpperEntityName(fieldValue);
				break;
			default:
				break;
		}

	}

}
